how to remove dash from string in javascript

73

how to remove dash from string in javascript -

var str="185-51-671";
var newStr = str.replace(/-/g, "");

Comments

Submit
0 Comments